package GUILayer;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.JButton;
import javax.swing.JPasswordField;
import javax.swing.SwingConstants;
import java.awt.Color;

public class Login extends JFrame {

	private JPanel WindowPane;
	private JTextField UserNameField;
	private JTextField PasswordField;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) 
	{
		EventQueue.invokeLater(new Runnable() 
		{
			public void run() 
			{
				try 
				{
					Login frame = new Login();
					frame.setVisible(true);
				} 
				catch (Exception e) 
				{
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public Login() 
	{
		setTitle("Start");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 800, 600);
		WindowPane = new JPanel();
		WindowPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(WindowPane);
		WindowPane.setLayout(null);
		
		JPanel BaggrundPanel = new JPanel();
		BaggrundPanel.setBounds(10, 11, 762, 548);
		WindowPane.add(BaggrundPanel);
		BaggrundPanel.setLayout(null);
		
		JLabel PasswordLabel = new JLabel("Password:");
		PasswordLabel.setFont(new Font("Arial", Font.PLAIN, 16));
		PasswordLabel.setBounds(12, 521, 101, 16);
		BaggrundPanel.add(PasswordLabel);
		
		JLabel UserNameLabel = new JLabel("Brugernavn:");
		UserNameLabel.setFont(new Font("Arial", Font.PLAIN, 16));
		UserNameLabel.setBounds(12, 494, 101, 16);
		BaggrundPanel.add(UserNameLabel);
		
		UserNameField = new JTextField();
		UserNameField.setToolTipText("Indtast brugernavn");
		UserNameField.setBounds(150, 493, 116, 22);
		BaggrundPanel.add(UserNameField);
		UserNameField.setColumns(10);
		
		JButton btnLogin = new JButton("Login");
		btnLogin.setBounds(655, 512, 97, 25);
		BaggrundPanel.add(btnLogin);
		
		PasswordField = new JTextField();
		PasswordField.setToolTipText("Indtast Adgangskode");
		PasswordField.setBounds(150, 520, 116, 22);
		BaggrundPanel.add(PasswordField);
		PasswordField.setColumns(10);
		
		JLabel ImageLabel = new JLabel("Billede");
		ImageLabel.setFont(new Font("Tahoma", Font.PLAIN, 61));
		ImageLabel.setBackground(Color.DARK_GRAY);
		ImageLabel.setHorizontalAlignment(SwingConstants.CENTER);
		ImageLabel.setIcon(null);
		ImageLabel.setBounds(12, 13, 740, 436);
		BaggrundPanel.add(ImageLabel);
	}
}
